package com.itcpeng.jobs;



import com.alibaba.dubbo.config.annotation.Reference;
import com.itcpeng.service.OrderSettingService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;


import java.util.Date;
////3、定时器已经基本满足了基本业务的开发，
// 但是，由于定时器的执行优先于注入，因此我们不能通过@Resource注入service。

@Controller
public class ClearOrderSetting {

    @Reference
    private OrderSettingService orderSettingService;

    public void clearOrderSetting() {
        orderSettingService.deleteOrderSettingByDate(new Date());
    }
}
